www.gusucode.com > 落叶冰点万能企业网站内容管理系统 V9.1 > 落叶冰点万能企业网站内容管理系统 V9.1\code\admin\adminModel\D_chk_edit_a_zimodel.asp

    <%


'**************************************************************
' 新动软网站管理系统
' 官方网站: http://www.aspcpu.com
' 系统作者: 阮丁远(网名:天下程序)
' Copyright 新动软网站管理系统 版权所有
'**************************************************************


%>





<LINK href="../css.css" type=text/css rel=stylesheet>
<%

dir_set="../../"


%>


<!--#include file=../../inc/conn.asp-->
<!--#include file=../../inc/Functionb.asp-->

<!--#include file=../../inc/ajaxLIB.asp-->

<!--#include file=../inc/checkadmin2.asp-->

<!--#include file=../../inc/functionFiless.asp-->



<!--#include file=../../inc/ND_class_function.asp-->
<!--#include file="modelsys_inc/D_model_class.asp"-->

<!--#include file=../../inc/new_md5.asp-->
<%
AJAXshowLoader()

%>

<%

if qx_if_max=0 then


response.redirect "../D_suodinguser.asp"
end if
%>


<%
function rp_textareax_h(aa)

rp_textareax_h=replace(aa,"<$/$textarea>","</textarea>",1,-1,1)
end function

	
Function DelTablezu(TableName)
err.clear 
On Error Resume Next
Conn.Execute("Drop Table "&TableName&"")
if err.number=0 then 
DelTablezu=1
response.write "<br>清理表 "&TableName&" 成功.."
response.Flush()
else
errrstrra=err.Description
err.clear 
DelTablezu=0
response.write "<br>清理表 "&TableName&" 失败(可能表不存在).."
response.Flush()

end if
End Function




Function DelColumnzu(TableName,ColumnName)
err.clear 
On Error Resume Next
Conn.Execute("Alter Table "&TableName&" Drop "&ColumnName&"")


if err.number=0 then 
DelColumnzu=1
response.write "<br>清理数据表 "&TableName&" 里的字段 "&ColumnName&" 成功.."
response.Flush()
else
errrstrra=err.Description
err.clear 

response.write "<br>清理数据表 "&TableName&" 里的字段 "&ColumnName&" 失败(可能表不存在或字段不存在).."
response.Flush()

DelColumnzu=0
end if
End Function


Function addColumnzu(TableName,ColumnName,Columntype)
err.clear 
On Error Resume Next
Conn.Execute("Alter Table "&TableName&" add "&ColumnName&" "&Columntype)


if err.number=0 then 
addColumnzu=1
response.write "<br>数据表 "&TableName&" 添加字段 "&ColumnName&" 成功.."
response.Flush()
else
errrstrra=err.Description
err.clear 

response.write "<br>数据表 "&TableName&" add字段 "&ColumnName&" 失败(可能表不存在或字段不存在).."
response.Flush()

addColumnzu=0
end if
End Function




set rs11=server.CreateObject("adodb.recordset")
       
rs11.open "select * from ND_models_reg where id="&request("modelid"),conn,1,1

biao_rnd_qianzhui=rs11("all_biao_rnd_qianzhui")
model_folder_path=rs11("model_folder_path_name")




'----------------------
zimodelxmlph="../../Model/Models/"&model_folder_path&"/"&iconfigbiaosfile
strXMLFile = Server.MapPath(zimodelxmlph)
oXMLDomg.Load(strXMLFile)

set nodek=oXMLDomg.documentElement.selectSingleNode("zimodels/zimodel[name='"&request("biaoname")&"']")

set nodea3=nodek.selectNodes("ziduans/ziduan")
lentaaa=nodea3.length



delziduansql=""

for lii=1 to lentaaa
zd_typex=cstr(trim(nodea3(lii-1).selectSingleNode("field_GUI_type").text))
cangsx=cstr(trim(nodea3(lii-1).selectSingleNode("field_GUI_cangshuos").text))
fidnamex=cstr(trim(nodea3(lii-1).selectSingleNode("field_name").text))

fid_pos_tick=lii

if request("lent")<>"" then
leentta=clng(request("lent"))
else
leentta=0
end if




for lii2=1 to leentta

zdnamea=request("zdname"&cstr(lii2))
zdbmnamea=request("zdbmname"&cstr(lii2))
zdtypea=cstr(request("zdtype"&cstr(lii2)))
zcixu=cstr(request("ahcixu"&cstr(lii2)))


have_yuan_ziduan=0

if zdnamea<>"" and zdbmnamea<>"" and zdtypea<>"no" and zcixu<>"" then

if lcase(trim(zdnamea))=lcase(trim(fidnamex)) and cstr(fid_pos_tick)=cstr(lii2) then 'fid_pos_tick和lii2不一样说明是删过后再加的
have_yuan_ziduan=1





'=======================================================检查批量输入框的值
iaa=lii2
if zdtypea="24" and cstr(fid_pos_tick)=cstr(lii2) then


'以|$aspcpu_g$|分隔各列


org_h=request("h24_a2_"&cstr(iaa))

max_h=request("h24_a3_"&cstr(iaa))

can_del_h=request("h24_a4_"&cstr(iaa))

pcangssd=org_h&","&max_h&","&can_del_h&"|$aspcpu_f$|"
                                    

have_lie=0

for icc2=1 to clng(request("len_piliangvlist_"&cstr(iaa)))



possaa="_piangliang_"&cstr(iaa)&"_"&cstr(icc2)


pzdbmnamea=request("h24_a1_"&cstr(iaa)&"_"&cstr(icc2))
pzdtypea=cstr(request("zdtype"&cstr(possaa)))
pzcixu=cstr(request("ecixu"&cstr(possaa)))


if pzdbmnamea<>"" and pzdtypea<>"no" and pzcixu<>"" then

'***************1
lena=-123


if pzdtypea="1" then
lena=3
end if

if pzdtypea="2" then
lena=3
end if

if pzdtypea="3" then
lena=5
end if

if pzdtypea="4" then
lena=1
end if

if pzdtypea="5" then
lena=1
end if


if pzdtypea="6" then
lena=1
end if

if pzdtypea="7" then
lena=3
end if

if pzdtypea="8" then
lena=1
end if

if pzdtypea="9" then
lena=1
end if


if pzdtypea="10" then
lena=0
end if

if pzdtypea="11" then
lena=3
end if

if pzdtypea="12" then
lena=0
end if

if pzdtypea="13" then
lena=0
end if

if pzdtypea="14" then
lena=0
end if


if pzdtypea="15" then


lena=2
end if


if pzdtypea="16" then



lena=2


end if

if pzdtypea="17" then
lena=0
end if

if pzdtypea="18" then
lena=0
end if

if pzdtypea="19" then
lena=0
end if


if pzdtypea="21" then
lena=2
end if

if pzdtypea="22" then
lena=2
end if

if pzdtypea="22" then
lena=2
end if

if pzdtypea="23" then
lena=2
end if

if pzdtypea="25" then
lena=4
end if

if pzdtypea="26" then
lena=3
end if


if pzdtypea="27" then


lena=2
end if

if pzdtypea="29" then
lena=1
end if

if pzdtypea="30" then
lena=5
end if


if lena<>-123 then


for icc=1 to lena

pcangssd=pcangssd&request("h"&pzdtypea&"_a"&cstr(icc)&"_"&cstr(possaa))&"|$aspcpu_a$|"

next

if lena>=1 then
pcangssd=left(pcangssd,len(pcangssd)-12)
end if



end if



'----------

if pzdtypea="20" then

for icc1=1 to clng(request("len_selectvlist_"&cstr(possaa)))

if request("h20_a1_"&cstr(possaa)&"_"&cstr(icc1))<>"" and request("h20_a1_"&cstr(possaa)&"_"&cstr(icc1)&"_v")<>"" then

pcangssd=pcangssd&request("h20_a1_"&cstr(possaa)&"_"&cstr(icc1))&"|$aspcpu_b$|"&request("h20_a1_"&cstr(possaa)&"_"&cstr(icc1)&"_v")&"|$aspcpu_a$|"

end if

next

if clng(request("len_selectvlist_"&cstr(possaa)))>=1 then
pcangssd=left(pcangssd,len(pcangssd)-12)
end if

end if

'----------

if pzdtypea="28" then



for icc3=1 to clng(request("len_radiovlist_"&cstr(possaa)))

if request("h28_a1_"&cstr(possaa)&"_"&cstr(icc3))<>"" and request("h28_a1_"&cstr(possaa)&"_"&cstr(icc3)&"_v")<>"" then

pcangssd=pcangssd&request("h28_a1_"&cstr(possaa)&"_"&cstr(icc3))&"|$aspcpu_b$|"&request("h28_a1_"&cstr(possaa)&"_"&cstr(icc3)&"_v")&"|$aspcpu_a$|"

end if

next

if clng(request("len_radiovlist_"&cstr(possaa)))>=1 then
pcangssd=left(pcangssd,len(pcangssd)-12)
end if




end if

'***************end 1
have_lie=1

pcangssd=pcangssd&"|$aspcpu_r1$|"&pzdbmnamea&"|$aspcpu_r1$|"&pzdtypea&"|$aspcpu_r1$|"&pzcixu&"|$aspcpu_g$|"
'             参数,字段名,字段类型,次序的分隔符                                                     列分隔符

end if


next

if have_lie=1 then
pcangssd=left(pcangssd,len(pcangssd)-12)
end if

plsrk_cangssa=pcangssd




end if


'=======================================================检查批量输入框的值



exit for
end if

end if

next



if have_yuan_ziduan=0 then
call DelColumnzu("["&biao_rnd_qianzhui&request("biaoname")&"]","["&fidnamex&"]")




'************************************************1

'删分类表
if zd_typex="15" then
biaonameav=split(cangsx,"|$aspcpu_a$|")
biaonameav_1=biaonameav(0)
call DelTablezu("["&biao_rnd_qianzhui&biaonameav_1&"]")
end if

'删专题表
if zd_typex="16" then
biaonameav=split(cangsx,"|$aspcpu_a$|")
biaonameav_1=biaonameav(0)
call DelTablezu("["&biao_rnd_qianzhui&biaonameav_1&"]")
end if


'删复选框配置表
if zd_typex="27" then
biaonameav=split(cangsx,"|$aspcpu_a$|")
biaonameav_1=biaonameav(0)
call DelTablezu("["&biao_rnd_qianzhui&biaonameav_1&"]")
end if




'如果是多行多列输入框
'=============if 多行多列输入框======================

if zd_typex="24" then
biaonameav=split(cangsx,"|$aspcpu_f$|")
biaonameav_1=biaonameav(1)
biaonameav_1_p=split(biaonameav_1,"|$aspcpu_g$|")

if trim(biaonameav_1)="" then
pllentt=0
else
pllentt=ubound(biaonameav_1_p)+1
end if

for plniii=1 to pllentt
biaonameav_1_p_1=biaonameav_1_p(plniii-1)
biaonameav_1_p_1_p=split(biaonameav_1_p_1,"|$aspcpu_r1$|")
biaonameav_1_p_1_p_3=biaonameav_1_p_1_p(2)
pzd_typex=biaonameav_1_p_1_p_3
cangsx2=biaonameav_1_p_1_p(0)



'删分类表
if pzd_typex="15" then
biaonameav=split(cangsx2,"|$aspcpu_a$|")
biaonameav_1=biaonameav(0)
call DelTablezu("["&biao_rnd_qianzhui&biaonameav_1&"]")
end if

'删专题表
if pzd_typex="16" then
biaonameav=split(cangsx2,"|$aspcpu_a$|")
biaonameav_1=biaonameav(0)
call DelTablezu("["&biao_rnd_qianzhui&biaonameav_1&"]")
end if


'删复选框配置表
if pzd_typex="27" then
biaonameav=split(cangsx2,"|$aspcpu_a$|")
biaonameav_1=biaonameav(0)
call DelTablezu("["&biao_rnd_qianzhui&biaonameav_1&"]")
end if




next

end if

'================end if多行多列输入框===================



'************************************************1


else






'如果字段没删,如果是多行多列输入框,则看里面有无分类表等
'------------------------------------------

if zd_typex="24" then





biaonameav=split(cangsx,"|$aspcpu_f$|")
biaonameav_1=biaonameav(1)
biaonameav_1_p=split(biaonameav_1,"|$aspcpu_g$|")

if trim(biaonameav_1)="" then
pllentt=0
else
pllentt=ubound(biaonameav_1_p)+1
end if

for plniii=1 to pllentt
biaonameav_1_p_1=biaonameav_1_p(plniii-1)
biaonameav_1_p_1_p=split(biaonameav_1_p_1,"|$aspcpu_r1$|")
biaonameav_1_p_1_p_3=biaonameav_1_p_1_p(2)
pzd_typex=biaonameav_1_p_1_p_3
cangsx2=biaonameav_1_p_1_p(0)





zbiaonameav=split(plsrk_cangssa,"|$aspcpu_f$|")
zbiaonameav_1=zbiaonameav(1)
zbiaonameav_1_p=split(zbiaonameav_1,"|$aspcpu_g$|")

if trim(zbiaonameav_1)="" then
zpllentt=0
else
zpllentt=ubound(zbiaonameav_1_p)+1
end if


'删分类表
if pzd_typex="15" then

'----
biaonameav=split(cangsx2,"|$aspcpu_a$|")
biaonameav_1=biaonameav(0)






have_pl_bia=0
for zplniii=1 to zpllentt
zbiaonameav_1_p_1=zbiaonameav_1_p(zplniii-1)
zbiaonameav_1_p_1_p=split(zbiaonameav_1_p_1,"|$aspcpu_r1$|")
zbiaonameav_1_p_1_p_3=zbiaonameav_1_p_1_p(2)
zpzd_typex=zbiaonameav_1_p_1_p_3
zcangsx2=zbiaonameav_1_p_1_p(0)
if zpzd_typex="15" then
zbiaonameav=split(zcangsx2,"|$aspcpu_a$|")
zbiaonameav_1=zbiaonameav(0)
if trim(lcase(zbiaonameav_1))=trim(lcase(biaonameav_1)) then

have_pl_bia=1
exit for
end if
end if
next

'----


if have_pl_bia=0 then
call DelTablezu("["&biao_rnd_qianzhui&biaonameav_1&"]")
end if


end if

'删专题表
if pzd_typex="16" then

'----
biaonameav=split(cangsx2,"|$aspcpu_a$|")
biaonameav_1=biaonameav(0)


have_pl_bia=0
for zplniii=1 to zpllentt
zbiaonameav_1_p_1=zbiaonameav_1_p(zplniii-1)
zbiaonameav_1_p_1_p=split(zbiaonameav_1_p_1,"|$aspcpu_r1$|")
zbiaonameav_1_p_1_p_3=zbiaonameav_1_p_1_p(2)
zpzd_typex=zbiaonameav_1_p_1_p_3
zcangsx2=zbiaonameav_1_p_1_p(0)
if zpzd_typex="16" then
zbiaonameav=split(zcangsx2,"|$aspcpu_a$|")
zbiaonameav_1=zbiaonameav(0)
if trim(lcase(zbiaonameav_1))=trim(lcase(biaonameav_1)) then

have_pl_bia=1
exit for
end if
end if
next

'----





if have_pl_bia=0 then
call DelTablezu("["&biao_rnd_qianzhui&biaonameav_1&"]")
end if

end if


'删复选框配置表
if pzd_typex="27" then


'----
biaonameav=split(cangsx2,"|$aspcpu_a$|")
biaonameav_1=biaonameav(0)



have_pl_bia=0
for zplniii=1 to zpllentt
zbiaonameav_1_p_1=zbiaonameav_1_p(zplniii-1)
zbiaonameav_1_p_1_p=split(zbiaonameav_1_p_1,"|$aspcpu_r1$|")
zbiaonameav_1_p_1_p_3=zbiaonameav_1_p_1_p(2)
zpzd_typex=zbiaonameav_1_p_1_p_3
zcangsx2=zbiaonameav_1_p_1_p(0)
if zpzd_typex="27" then
zbiaonameav=split(zcangsx2,"|$aspcpu_a$|")
zbiaonameav_1=zbiaonameav(0)
if trim(lcase(zbiaonameav_1))=trim(lcase(biaonameav_1)) then

have_pl_bia=1
exit for
end if
end if
next

'----



if have_pl_bia=0 then
call DelTablezu("["&biao_rnd_qianzhui&biaonameav_1&"]")
end if


end if




next






end if

'------------------------------------------







end if


next












set filea=new Cls_FSO


biaoname=trim(request("biaoname"))
xmbeizhu=trim(request("xmbeizhu"))


b_err=0



if biaoname="" then

%>
<script language=javascript>
alert("数据库表名 不能为空");

history.go(-1);


</script>

<%
response.end
b_err=1

end if

for ia1=1 to clng(request("lent"))
if lcase(trim(request("zdname"&cstr(ia1))))="id" then
b_err=1
%>
<script language=javascript>
alert("系统发现某个字段名输入了id,数据库表字段名 不能为id,id已被系统使用");

history.go(-1);


</script>

<%
response.end

exit for
end if
next


for ia1=1 to clng(request("lent"))
if lcase(trim(request("zdname"&cstr(ia1))))<>"" and trim(request("zdbmname"&cstr(ia1)))=""   then
b_err=1
%>
<script language=javascript>
alert("系统发现某个字段名输入框里输入了字段名,但是没同时在其字段别名输入框里输入值,字段别名不能为空");

history.go(-1);


</script>

<%
response.end

exit for
end if
next





for ia1=1 to clng(request("lent"))
if lcase(trim(request("zdname"&cstr(ia1))))<>"" and (trim(request("zdtype"&cstr(ia1)))="" or trim(request("zdtype"&cstr(ia1)))="no")  then
b_err=1
%>
<script language=javascript>
alert("系统发现某个字段名输入框里输入了字段名,但是没同时选择其字段类型,请选择其字段类型");

history.go(-1);


</script>

<%
response.end

exit for
end if
next



for ia1=1 to (clng(request("lent"))-1)
ia22=ia1+1
for ia2=ia22 to clng(request("lent"))
if lcase(trim(request("zdname"&cstr(ia1))))=lcase(trim(request("zdname"&cstr(ia2)))) and trim(request("zdname"&cstr(ia1)))<>""  then
b_err=1
%>
<script language=javascript>
alert("系统发现某两个或几个字段名输入框里输入了一样的字段名,字段名不能重复");

history.go(-1);


</script>

<%
response.end

exit for
end if
next
next





ycodenn=0
for ia1=1 to clng(request("lent"))
if cstr(trim(request("zdtype"&cstr(ia1))))="10" then
ycodenn=ycodenn+1
end if
next

if ycodenn>1 then
b_err=1
%>
<script language=javascript>
alert("系统发现字段类型为验证码的字段数大于1,必须只存在一个或0个字段类型为验证码的字段");

history.go(-1);


</script>

<%
response.end
end if





set rs11=server.CreateObject("adodb.recordset")
       
rs11.open "select * from ND_models_reg where id="&request("modelid"),conn,1,1

biao_rnd_qianzhui=rs11("all_biao_rnd_qianzhui")
model_folder_path=rs11("model_folder_path_name")






if b_err=0 then



if request("lent")<>"" then
leentta=clng(request("lent"))
else
leentta=0
end if


ziduanxmlss=""

for iaa=1 to leentta

zdnamea=request("zdname"&cstr(iaa))
zdbmnamea=request("zdbmname"&cstr(iaa))
zdtypea=cstr(request("zdtype"&cstr(iaa)))
zcixu=cstr(request("ahcixu"&cstr(iaa)))
zdadminpages=cstr(request("zdadminpages"&cstr(iaa)))
ilistadminpage=cstr(request("ilistadminpage"&cstr(iaa)))
isearchadminpage=cstr(request("isearchadminpage"&cstr(iaa)))




if zdnamea<>"" and zdbmnamea<>"" and zdtypea<>"no" and zcixu<>"" then



'----------------------------------------------------------------
lena=-123


if zdtypea="1" then
lena=3
end if

if zdtypea="2" then
lena=3
end if

if zdtypea="3" then
lena=5
end if

if zdtypea="4" then
lena=1
end if

if zdtypea="5" then
lena=1
end if


if zdtypea="6" then
lena=1
end if

if zdtypea="7" then
lena=3
end if

if zdtypea="8" then
lena=1
end if

if zdtypea="9" then
lena=1
end if


if zdtypea="10" then
lena=0
end if

if zdtypea="11" then
lena=3
end if

if zdtypea="12" then
lena=0
end if

if zdtypea="13" then
lena=0
end if

if zdtypea="14" then
lena=0
end if


'-------------------15
if zdtypea="15" then



'针对一个存在多个同分类表名的分类字段等,只删了其中一个分类表字段,还是要新建立此分类表
'针对一个存在多个同分类表名的分类字段等,只删了其中一个分类表字段,还是要新建立此分类表
if is_exist_biao("["&biao_rnd_qianzhui&trim(request("h15_a1_"&cstr(iaa)))&"]")=1 and (is_exist_biao_lie("["&biao_rnd_qianzhui&trim(request("h15_a1_"&cstr(iaa)))&"]","[parent_id_list]")=0 or is_exist_biao_lie("["&biao_rnd_qianzhui&trim(request("h15_a1_"&cstr(iaa)))&"]","[deepth]")=0) then

b_err=1
%>
<script language=javascript>
alert("字段"&cstr(iaa)&"里设置的分类表已经存在于数据库了,且这个已存在的表不是分类表的表结构,无法使用,请重新设置分类表表名")
history.go(-1);


</script>

<%
response.end

else
if is_exist_biao("["&biao_rnd_qianzhui&trim(request("h15_a1_"&cstr(iaa)))&"]")=0 then

call exe_sqls(get_fenlei_biao_sql("["&biao_rnd_qianzhui&trim(request("h15_a1_"&cstr(iaa)))&"]"))

end if

end if


lena=2


end if


'-------------------15


if zdtypea="16" then







'-------------------16
'针对一个存在多个同分类表名的分类字段等,只删了其中一个分类表字段,还是要新建立此分类表
'针对一个存在多个同分类表名的分类字段等,只删了其中一个分类表字段,还是要新建立此分类表
if is_exist_biao("["&biao_rnd_qianzhui&trim(request("h16_a1_"&cstr(iaa)))&"]")=1 and is_exist_biao_lie("["&biao_rnd_qianzhui&trim(request("h16_a1_"&cstr(iaa)))&"]","[Specialname]")=0 then

b_err=1
%>
<script language=javascript>
alert("字段"&cstr(iaa)&"里设置的专题表已经存在于数据库了,且这个已存在的表不是专题表的表结构,无法使用,请重新设置专题表表名")
history.go(-1);


</script>

<%
response.end

else
if is_exist_biao("["&biao_rnd_qianzhui&trim(request("h16_a1_"&cstr(iaa)))&"]")=0 then

call exe_sqls(get_zhuanti_biao_sql("["&biao_rnd_qianzhui&trim(request("h16_a1_"&cstr(iaa)))&"]"))

end if

end if

'-------------------16



lena=2

end if

if zdtypea="17" then
lena=0
end if

if zdtypea="18" then
lena=0
end if

if zdtypea="19" then
lena=0
end if


if zdtypea="21" then
lena=2
end if

if zdtypea="22" then
lena=2
end if

if zdtypea="22" then
lena=2
end if

if zdtypea="23" then
lena=2
end if

if zdtypea="25" then
lena=4
end if

if zdtypea="26" then
lena=3
end if


if zdtypea="27" then









'-------------------27
'针对一个存在多个同分类表名的分类字段等,只删了其中一个分类表字段,还是要新建立此分类表
'针对一个存在多个同分类表名的分类字段等,只删了其中一个分类表字段,还是要新建立此分类表
if is_exist_biao("["&biao_rnd_qianzhui&trim(request("h27_a1_"&cstr(iaa)))&"]")=1 and is_exist_biao_lie("["&biao_rnd_qianzhui&trim(request("h27_a1_"&cstr(iaa)))&"]","[Specialname]")=0 then

b_err=1
%>
<script language=javascript>
alert("字段"&cstr(iaa)&"里设置的表已经存在于数据库了,且这个已存在的表不是 复选框配置表 的表结构,无法使用,请重新设置复选框配置表表名")
history.go(-1);


</script>

<%
response.end

else
if is_exist_biao("["&biao_rnd_qianzhui&trim(request("h27_a1_"&cstr(iaa)))&"]")=0 then

call exe_sqls(get_zhuanti_biao_sql("["&biao_rnd_qianzhui&trim(request("h27_a1_"&cstr(iaa)))&"]"))

end if

end if

'-------------------27









lena=2


end if

if zdtypea="29" then
lena=1
end if

if zdtypea="30" then
lena=5
end if

cangssd=""
if lena<>-123 then

for icc=1 to lena

cangssd=cangssd&request("h"&zdtypea&"_a"&cstr(icc)&"_"&cstr(iaa))&"|$aspcpu_a$|"

next

if lena>=1 then
cangssd=left(cangssd,len(cangssd)-12)
end if

cangssa=cangssd

end if



'----------

if zdtypea="20" then
cangssd=""
for icc1=1 to clng(request("len_selectvlist_"&cstr(iaa)))

if request("h20_a1_"&cstr(iaa)&"_"&cstr(icc1))<>"" and request("h20_a1_"&cstr(iaa)&"_"&cstr(icc1)&"_v")<>"" then

cangssd=cangssd&request("h20_a1_"&cstr(iaa)&"_"&cstr(icc1))&"|$aspcpu_b$|"&request("h20_a1_"&cstr(iaa)&"_"&cstr(icc1)&"_v")&"|$aspcpu_a$|"

end if

next

if clng(request("len_selectvlist_"&cstr(iaa)))>=1 then
cangssd=left(cangssd,len(cangssd)-12)
end if

cangssa=cangssd

end if

'----------

if zdtypea="28" then



cangssd=""
for icc3=1 to clng(request("len_radiovlist_"&cstr(iaa)))

if request("h28_a1_"&cstr(iaa)&"_"&cstr(icc3))<>"" and request("h28_a1_"&cstr(iaa)&"_"&cstr(icc3)&"_v")<>"" then

cangssd=cangssd&request("h28_a1_"&cstr(iaa)&"_"&cstr(icc3))&"|$aspcpu_b$|"&request("h28_a1_"&cstr(iaa)&"_"&cstr(icc3)&"_v")&"|$aspcpu_a$|"

end if

next

if clng(request("len_radiovlist_"&cstr(iaa)))>=1 then
cangssd=left(cangssd,len(cangssd)-12)
end if


cangssa=cangssd

end if



'----------start piliangkuang-------------------------------------********************


if zdtypea="24" then


'以|$aspcpu_g$|分隔各列


org_h=request("h24_a2_"&cstr(iaa))

max_h=request("h24_a3_"&cstr(iaa))

can_del_h=request("h24_a4_"&cstr(iaa))

pcangssd=org_h&","&max_h&","&can_del_h&"|$aspcpu_f$|"
                                    

have_lie=0

for icc2=1 to clng(request("len_piliangvlist_"&cstr(iaa)))



possaa="_piangliang_"&cstr(iaa)&"_"&cstr(icc2)


pzdbmnamea=request("h24_a1_"&cstr(iaa)&"_"&cstr(icc2))
pzdtypea=cstr(request("zdtype"&cstr(possaa)))
pzcixu=cstr(request("ecixu"&cstr(possaa)))


if pzdbmnamea<>"" and pzdtypea<>"no" and pzcixu<>"" then

'***************1
lena=-123


if pzdtypea="1" then
lena=3
end if

if pzdtypea="2" then
lena=3
end if

if pzdtypea="3" then
lena=5
end if

if pzdtypea="4" then
lena=1
end if

if pzdtypea="5" then
lena=1
end if


if pzdtypea="6" then
lena=1
end if

if pzdtypea="7" then
lena=3
end if

if pzdtypea="8" then
lena=1
end if

if pzdtypea="9" then
lena=1
end if


if pzdtypea="10" then
lena=0
end if

if pzdtypea="11" then
lena=3
end if

if pzdtypea="12" then
lena=0
end if

if pzdtypea="13" then
lena=0
end if

if pzdtypea="14" then
lena=0
end if


if pzdtypea="15" then

'针对一个存在多个同分类表名的分类字段等,只删了其中一个分类表字段,还是要新建立此分类表
'针对一个存在多个同分类表名的分类字段等,只删了其中一个分类表字段,还是要新建立此分类表
if is_exist_biao("["&biao_rnd_qianzhui&trim(request("h15_a1_"&possaa))&"]")=1 and (is_exist_biao_lie("["&biao_rnd_qianzhui&trim(request("h15_a1_"&possaa))&"]","[parent_id_list]")=0 or is_exist_biao_lie("["&biao_rnd_qianzhui&trim(request("h15_a1_"&possaa))&"]","[deepth]")=0) then

b_err=1
%>
<script language=javascript>
alert("字段"&cstr(iaa)&"里第"&cstr(icc2)&"列里 设置的分类表已经存在于数据库了,且这个已存在的表不是分类表的表结构,无法使用,请重新设置分类表表名")
history.go(-1);


</script>

<%
response.end

else
if is_exist_biao("["&biao_rnd_qianzhui&trim(request("h15_a1_"&possaa))&"]")=0 then

call exe_sqls(get_fenlei_biao_sql("["&biao_rnd_qianzhui&trim(request("h15_a1_"&possaa))&"]"))

end if

end if




'-------------------15


lena=2
end if


if pzdtypea="16" then




'-------------------16
'针对一个存在多个同分类表名的分类字段等,只删了其中一个分类表字段,还是要新建立此分类表
'针对一个存在多个同分类表名的分类字段等,只删了其中一个分类表字段,还是要新建立此分类表
if is_exist_biao("["&biao_rnd_qianzhui&trim(request("h16_a1_"&possaa))&"]")=1 and is_exist_biao_lie("["&biao_rnd_qianzhui&trim(request("h16_a1_"&possaa))&"]","[Specialname]")=0 then

b_err=1
%>
<script language=javascript>
alert("字段"&cstr(iaa)&"里第"&cstr(icc2)&"列里 设置的专题表已经存在于数据库了,且这个已存在的表不是专题表的表结构,无法使用,请重新设置专题表表名")
history.go(-1);


</script>

<%
response.end

else
if is_exist_biao("["&biao_rnd_qianzhui&trim(request("h16_a1_"&possaa))&"]")=0 then

call exe_sqls(get_zhuanti_biao_sql("["&biao_rnd_qianzhui&trim(request("h16_a1_"&possaa))&"]"))

end if

end if

'-------------------16







lena=2


end if

if pzdtypea="17" then
lena=0
end if

if pzdtypea="18" then
lena=0
end if

if pzdtypea="19" then
lena=0
end if


if pzdtypea="21" then
lena=2
end if

if pzdtypea="22" then
lena=2
end if

if pzdtypea="22" then
lena=2
end if

if pzdtypea="23" then
lena=2
end if

if pzdtypea="25" then
lena=4
end if

if pzdtypea="26" then
lena=3
end if


if pzdtypea="27" then






'-------------------16
'针对一个存在多个同分类表名的分类字段等,只删了其中一个分类表字段,还是要新建立此分类表
'针对一个存在多个同分类表名的分类字段等,只删了其中一个分类表字段,还是要新建立此分类表
if is_exist_biao("["&biao_rnd_qianzhui&trim(request("h27_a1_"&possaa))&"]")=1 and is_exist_biao_lie("["&biao_rnd_qianzhui&trim(request("h27_a1_"&possaa))&"]","[Specialname]")=0 then

b_err=1
%>
<script language=javascript>
alert("字段"&cstr(iaa)&"里第"&cstr(icc2)&"列里 设置的专题表已经存在于数据库了,且这个已存在的表不是专题表的表结构,无法使用,请重新设置专题表表名")
history.go(-1);


</script>

<%
response.end

else
if is_exist_biao("["&biao_rnd_qianzhui&trim(request("h27_a1_"&possaa))&"]")=0 then

call exe_sqls(get_zhuanti_biao_sql("["&biao_rnd_qianzhui&trim(request("h27_a1_"&possaa))&"]"))

end if

end if

'-------------------16






lena=2
end if

if pzdtypea="29" then
lena=1
end if

if pzdtypea="30" then
lena=5
end if


if lena<>-123 then


for icc=1 to lena

pcangssd=pcangssd&request("h"&pzdtypea&"_a"&cstr(icc)&"_"&cstr(possaa))&"|$aspcpu_a$|"

next

if lena>=1 then
pcangssd=left(pcangssd,len(pcangssd)-12)
end if



end if



'----------

if pzdtypea="20" then

for icc1=1 to clng(request("len_selectvlist_"&cstr(possaa)))

if request("h20_a1_"&cstr(possaa)&"_"&cstr(icc1))<>"" and request("h20_a1_"&cstr(possaa)&"_"&cstr(icc1)&"_v")<>"" then

pcangssd=pcangssd&request("h20_a1_"&cstr(possaa)&"_"&cstr(icc1))&"|$aspcpu_b$|"&request("h20_a1_"&cstr(possaa)&"_"&cstr(icc1)&"_v")&"|$aspcpu_a$|"

end if

next

if clng(request("len_selectvlist_"&cstr(possaa)))>=1 then
pcangssd=left(pcangssd,len(pcangssd)-12)
end if

end if

'----------

if pzdtypea="28" then



for icc3=1 to clng(request("len_radiovlist_"&cstr(possaa)))

if request("h28_a1_"&cstr(possaa)&"_"&cstr(icc3))<>"" and request("h28_a1_"&cstr(possaa)&"_"&cstr(icc3)&"_v")<>"" then

pcangssd=pcangssd&request("h28_a1_"&cstr(possaa)&"_"&cstr(icc3))&"|$aspcpu_b$|"&request("h28_a1_"&cstr(possaa)&"_"&cstr(icc3)&"_v")&"|$aspcpu_a$|"

end if

next

if clng(request("len_radiovlist_"&cstr(possaa)))>=1 then
pcangssd=left(pcangssd,len(pcangssd)-12)
end if




end if

'***************end 1
have_lie=1

pcangssd=pcangssd&"|$aspcpu_r1$|"&pzdbmnamea&"|$aspcpu_r1$|"&pzdtypea&"|$aspcpu_r1$|"&pzcixu&"|$aspcpu_g$|"
'             参数,字段名,字段类型,次序的分隔符                                                     列分隔符

end if


next

if have_lie=1 then
pcangssd=left(pcangssd,len(pcangssd)-12)
end if

cangssa=pcangssd

end if

'----------end piliangkuang-------------------------------------********************









'====================================================================




if zdtypea="1" then


createTableSql=" text"


end if



if zdtypea="2" then
createTableSql=" varchar(80)"

end if

if zdtypea="3" then
createTableSql=" text"

end if

if zdtypea="4" then
createTableSql=" varchar(200)"

end if

if zdtypea="5" then
createTableSql=" varchar(30)"

end if
if zdtypea="6" then
createTableSql=" varchar(30)"

end if


if zdtypea="7" then
createTableSql=" text"

end if

if zdtypea="8" then
createTableSql=" text"

end if

if zdtypea="9" then
createTableSql=" text"

end if


if zdtypea="10" then
createTableSql=""
end if

if zdtypea="11" then
createTableSql=" text"

end if

if zdtypea="12" then
createTableSql=" varchar(10)"

end if

if zdtypea="13" then
createTableSql=" varchar(70)"

end if

if zdtypea="14" then
createTableSql=" varchar(80)"

end if

if zdtypea="15" then
createTableSql=" varchar(50)"

end if

if zdtypea="16" then
createTableSql=" text"

end if


if zdtypea="17" then
createTableSql=" varchar(20)"

end if

if zdtypea="18" then
createTableSql=" varchar(20)"

end if

if zdtypea="19" then
createTableSql=" varchar(20)"

end if

if zdtypea="20" then
createTableSql=" varchar(240)"

end if

if zdtypea="21" then
createTableSql=" text"

end if

if zdtypea="22" then
createTableSql=" text"

end if

if zdtypea="23" then
createTableSql=" text"

end if

if zdtypea="24" then
createTableSql=" text"

end if


if zdtypea="25" then
createTableSql=" varchar(80)"

end if

if zdtypea="26" then
createTableSql=" varchar(200)"

end if

if zdtypea="27" then
createTableSql=" text"

end if

if zdtypea="28" then
createTableSql=" varchar(240)"

end if



if zdtypea="29" then

hzd_lx=cstr(request("h29_a1_"&cstr(iaa)))
if hzd_lx="text" then
createTableSql=" text"
end if
if hzd_lx="bool" then
createTableSql=" varchar(10)" '不能为int,以免添加页传入空值到int字段里而出错
end if
if hzd_lx="time" then
createTableSql=" varchar(60)" '不能为int,以免添加页传入空值到int字段里而出错
end if
if hzd_lx="num1" then
createTableSql=" varchar(30)" '不能为int,以免添加页传入空值到int字段里而出错
end if
if hzd_lx="num2" then
createTableSql=" varchar(30)" '不能为int,以免添加页传入空值到int字段里而出错
end if


end if













if zdtypea="30" then
createTableSql=" text"
end if


if zdtypea="31" then
createTableSql=" varchar(200)"
end if


ziduanxmlss=ziduanxmlss&zdnamea&"$aspcpu1$"&zcixu&"$aspcpu1$"&zdadminpages&"$aspcpu1$"&ilistadminpage&"$aspcpu1$"&isearchadminpage&"$aspcpu1$"&zdbmnamea&"$aspcpu1$"&zdtypea&"$aspcpu1$"&cangssa&"$aspcpu_bss_2$"
'                           0                 1                 2                           3                            4                        5                    6                  7





TableNamea="["&biao_rnd_qianzhui&request("biaoname")&"]"

'---
have_zddd=0
for lii=1 to lentaaa
zd_typex=cstr(trim(nodea3(lii-1).selectSingleNode("field_GUI_type").text))
cangsx=cstr(trim(nodea3(lii-1).selectSingleNode("field_GUI_cangshuos").text))
fidnamex=cstr(trim(nodea3(lii-1).selectSingleNode("field_name").text))
fid_pos_tick=lii

if lcase(trim(zdnamea))=lcase(trim(fidnamex)) and cstr(fid_pos_tick)=cstr(iaa) then 'fid_pos_tick和lii2不一样说明是删过后再加的
have_zddd=1
exit for


end if

next


if have_zddd=0 then
if createTableSql<>"" then
'添加新建立的数据表列
call addColumnzu(TableNamea,"["&zdnamea&"]",createTableSql)
end if
end if
'-----











end if


next



if ziduanxmlss<>"" then
ziduanxmlss=left(ziduanxmlss,len(ziduanxmlss)-14)
end if


ziduanxmlss=ziduanxmlss&"|$aspcpu_kkk$|"&biaoname&"|$aspcpu_hh$|"&xmbeizhu&"|$aspcpu_hh$|"&request("adminpagextype")&"|$aspcpu_hh$|"&request("admintyy")&"|$aspcpu_hh$|"&request("admintyyh")&"|$aspcpu_hh$|"&request("admintyyw")&"|$aspcpu_hh$|"&request("ppaurl")&"|$aspcpu_hh$|"&rp_textareax_h(request("onsbt"))&"|$aspcpu_hh$|"&rp_textareax_h(request("cstasptj"))&"|$aspcpu_hh$|"&rp_textareax_h(request("onsbt2"))&"|$aspcpu_hh$|"&rp_textareax_h(request("cstaspxg"))&"|$aspcpu_hh$|"&rp_textareax_h(request("tjcly"))&"|$aspcpu_hh$|"&rp_textareax_h(request("xgcly"))&"|$aspcpu_hh$|"&rp_textareax_h(request("sccly"))
'                                              0表名            1备注                               2子模型类型                                3是否会员后台可调用                       4height                                5 width                     6 huiyuan_iframe_url                 7 添加页自定义onsubmit                             8 添加页自定义                                 9 修改页自定义onsubmit                                10  修改页自定义                                    11 do_add_page_custom                      12 do_edit_page_custom                         13do_del_page_custom                  







ziduanxmlss=ziduanxmlss&"|$aspcpu_hh$|"&request("lispg_edit")&"|$aspcpu_hh$|"&request("lispg_del")
'                                         内容列表页菜单项-修改               内容列表页菜单项-删除



'自定义管理页
p_xmls=""
for icc7=1 to clng(request("len_cstpagett"))

mname=request("cstpagett_"&cstr(icc7))
p_is_show_in_menu=request("cstpagett_"&cstr(icc7)&"_c")
pid=request("cstpagett_"&cstr(icc7)&"_pid")
if mname<>"" and pid<>"" then
p_xmls=p_xmls&mname&"|$aspcpu_g1$|"&p_is_show_in_menu&"|$aspcpu_g1$|"&pid&"|$aspcpu_g2$|"
end if

next
if p_xmls<>"" then
p_xmls=left(p_xmls,len(p_xmls)-13)
end if





menu_xmls=""
for icc8=1 to clng(request("len_listxmtt"))

mname=request("listxmtt_"&cstr(icc8))
pid=request("listxmtt_"&cstr(icc8)&"_pid")

if mname<>"" and pid<>"" then
menu_xmls=menu_xmls&mname&"|$aspcpu_g1$|"&pid&"|$aspcpu_g2$|"
end if
next
if menu_xmls<>"" then
menu_xmls=left(menu_xmls,len(menu_xmls)-13)
end if



ziduanxmlss=ziduanxmlss&"|$aspcpu_hh$|"&p_xmls&"|$aspcpu_hh$|"&menu_xmls&"|$aspcpu_hh$|"&request("adminnamea")










set node=oXMLDomg.documentElement.selectSingleNode("zimodels/zimodel[name='"&request("biaoname")&"']")
node.ParentNode.RemoveChild(node)
call SaveXMLDocumentgg(zimodelxmlph)


call add_zimodel_xml(ziduanxmlss,"../../Model/Models/"&model_folder_path&"/"&iconfigbiaosfile)


call createfile("../../Model/Models/"&model_folder_path&"/"&"is_need_complied.asp","1",true)


%>



<script language=javascript>

alert("子模型修改成功,点击确定开始后台子模型的编译来刷新本后台模型生成的后台");

self.location="D_complie_all_zimodel_before.asp?modelid=<%=request("modelid")%>&callbackurl=D_admin_zimodels.asp$wenhao$modelid=<%=request("modelid")%>";


</script>


<%


end if
%>

<%
AJAXcloseLoader()
%>